#pragma once

#define _1KB       1024		//bytes
#define _1MB	1048576		//1024*1024 bytes




#define _ARGB(a,r,g,b) ((uint)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
#define _RGBA(r,g,b,a) _ARGB(a,r,g,b)
#define _XRGB(r,g,b)   _ARGB(0xff,r,g,b)
#define _COLORVALUE(r,g,b,a) _RGBA((uint)((r)*255.f),(uint)((g)*255.f),(uint)((b)*255.f),(uint)((a)*255.f))



#ifdef _DEBUG
	#include "utils/debugtools.h"

	#define _assert(exp) { if (!(exp)) _assert_fn(#exp,__FILE__,__LINE__); }
	#define _assert2(exp, msg) { if (!(exp)) _assert2_fn(#exp,msg,__FILE__,__LINE__); }

#else
	#define _assert(exp)
	#define _assert2(exp, msg)

#endif
